<?php
  require 'modal/tool.php';
  require 'modal/user.php';
  require 'modal/chanpin.php';
  require 'modal/cv.php';
  require 'modal/deliver.php';
  require 'modal/message.php';
  require 'modal/recruit.php';
  require 'modal/lunbo.php';
  require 'modal/my_manager.php';


  //jlkajslkdjflkjaslkjd

  // phpinfo();

  header('Access-Control-Allow-Origin:*');

  header('Content-Type:application/json; charset=utf8');

  $con = "";

  function connect_to_mysql(){
    global $con;
    // var_dump($_GET);
    $con = mysql_connect("39.106.19.54:3306","root","12345678");

    mysql_query("set names utf8");
    if (!$con){
      die('Could not connect: ' . mysql_error());
    }
    
    mysql_select_db("zzz", $con);
  }


  function close_to_mysql(){
    global $con;
    mysql_close($con);
  }


  connect_to_mysql();

  // echo time()

  call_user_func_array($_GET["method"] , array());

  close_to_mysql()
  

?>